package model;
import java.util.*;

public class Employee extends Person
{	
	private String password;
	private ArrayList<Case> caseList = new ArrayList<Case>();
	private String accessType;
	private String status;
	
	public Employee(String cpr, String name, String address, String zipCode, String city, String phone, String gsm, String email)
	{
		super(cpr, name, address, zipCode, city, phone, gsm, email);
	}
	
	public Employee()
	{
		
	}

	public Person getPerson()
	{
		return getThisPerson();
	}
	
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public ArrayList<Case> getCases()
	{
		return caseList;
	}
	
	public void setCases(ArrayList<Case> caseList)
	{
		this.caseList = caseList;
	}
	
	public void removeCase(Case toRemove)
	{
		Iterator<Case> it = caseList.iterator();
		while(it.hasNext())
		{
			Case caseParse = it.next();
			if(toRemove.getId().equals(caseParse.getId())) it.remove();
		}
	}
	
	public void addCase(Case toAdd)
	{
		caseList.add(toAdd);
	}

	public String getAccessType() {
		return accessType;
	}

	public void setAccessType(String accessType) {
		this.accessType = accessType;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}
